package fr.insta.reverse.uml.bean;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

@Entity
@Table(name = "visibilite",
		catalog = "reverseUml",
		uniqueConstraints = @UniqueConstraint(columnNames = { "vis_lib" }))
public class Visibilite implements java.io.Serializable
{
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "vis_id", unique = true, nullable = false)
	private int id;

	@Column(name = "vis_lib", length = 50)
	private String lib;

	public Visibilite()
	{
	}

	public Visibilite(int id)
	{
		this.id = id;
	}

	public Visibilite(String lib)
	{
		this.lib = lib;
	}

	public Visibilite(int id, String lib)
	{
		this.id = id;
		this.lib = lib;
	}

	public int getId()
	{
		return id;
	}

	public void setId(int id)
	{
		this.id = id;
	}

	public String getLib()
	{
		return lib;
	}

	public void setLib(String lib)
	{
		this.lib = lib;
	}

	@Override
	public String toString()
	{
		return id + ", " + lib;
	}
}
